package com.jeehentor.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Map;

/**
 * <p>
 * 系统菜单表
 * </p>
 *
 * @author wzd
 * @since 2024-04-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_menu")
@Schema(description ="系统菜单表")
public class SysMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @Schema(description =  "父id")
    private String parentId;

    @Schema(description =  "菜单名称")
    private String title;

    @Schema(description =  "路径")
    private String path;

    @Schema(description =  "组件")
    private String component;

    @Schema(description =  "图标")
    private String icon;

    @Schema(description =  "组件名称")
    private String name;

    @Schema(description =  "菜单状态")
    private String status;

    @Schema(description =  "菜单类型 0：目录 1：菜单")
    private String type;

    @Schema(description =  "创建人")
    private String createBy;

    @Schema(description =  "创建日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description =  "更新人")
    private String updateBy;

    @Schema(description =  "更新日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private Map<String,String> props;

}
